package com.qianying.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 用户与工种关联实体类
 * 作者：check
 */
@Data
@TableName("user_work_type")
@Schema(description = "用户与工种关联实体")
public class UserWorkType {

    @TableId(type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "用户ID", required = true, example = "1")
    private Long userId;

    @Schema(description = "工种ID", required = true, example = "101")
    private Long workTypeId;

   @TableField(exist = false)
    private String workTypeName;

    @Schema(description = "工种证书（允许为空）", example = "电工证-123456")
    private String workCertificate;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
}
